package com.gu.mobileweb.controller;

import com.gu.mobileweb.model.IndexWeek;
import com.gu.mobileweb.service.IndexWeekService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/home/week")
public class IndexWeekController {
    @Autowired
    private IndexWeekService indexWeekService;

    @GetMapping("/list")
    public List<IndexWeek> list(){
        return indexWeekService.getAllIndexWeek();
    }
}
